/*
 * @Description: 生成GetByIdDto
 * @Author: DHL
 * @Date: 2022-01-30 14:20:12
 * @LastEditors: DHL
 * @LastEditTime: 2022-10-10 17:04:27
 */

import { firstToLowerCase } from '../../../utils/codeGenUtils'

export function createGetByIdDto(codeGenConfig: any) {
  const classNameFirstToLowerCase = firstToLowerCase(codeGenConfig.className)
  const extendsClassName = codeGenConfig.className + 'Dto'
  const className = 'Get' + codeGenConfig.className + 'ByIdDto'
  codeGenConfig.genName = codeGenConfig.genName + ' - 根据主键查询出参'

  return `
package ${codeGenConfig.packageName}.entity.${classNameFirstToLowerCase}.dto;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import java.math.BigDecimal;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName: ${className}
 * @Description: ${codeGenConfig.genName}
 * 
 * @author ${codeGenConfig.genAuthor}
 * @date ${codeGenConfig.createData}
 */
@ApiModel(value = "${className}", description = "${codeGenConfig.genName}")
public class ${className} extends ${extendsClassName} implements Serializable {
  private static final long serialVersionUID = 1L;
}
`
}
